import request from '@/utils/request'

// 查询退租列表
export function listContrctrefund(query) {
  return request({
    url: '/contrctrefund/contrctrefund/list',
    method: 'get',
    params: query
  })
}

// 查询退租详细
export function getContrctrefund(id) {
  return request({
    url: '/contrctrefund/contrctrefund/' + id,
    method: 'get'
  })
}

// 新增退租
export function addContrctrefund(data) {
  return request({
    url: '/contrctrefund/contrctrefund',
    method: 'post',
    data: data
  })
}

// 修改退租
export function updateContrctrefund(data) {
  return request({
    url: '/contrctrefund/contrctrefund',
    method: 'put',
    data: data
  })
}

// 删除退租
export function delContrctrefund(id) {
  return request({
    url: '/contrctrefund/contrctrefund/' + id,
    method: 'delete'
  })
}

// 审核退租
export function applyContrctrefund(refundId) {
  return request({
    url: '/contrctrefund/contrctrefund/apply/' + refundId,
    method: 'post'
  })
}

// 获取所有退租
export function getAllContrctrefund(refundId) {
  return request({
    url: '/contrctrefund/contrctrefund/allData/' + refundId,
    method: 'post'
  })
}
